<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="1"    onclick="show1( )"   id="btn1" />

     <input type="button" value="2"    onclick="show2( )"   id="btn2" />
     <input type="button" value="3"    onclick="show3( )"   id="btn3" />
     <input type="button" value="4"    onclick="show4( )"   id="btn4"  />
     
     <div class=""><img  src=" images/1.jpg  "  id="pic" /></div>
     <script>
         function   show1(){
             pic.src=" images/1.jpg ";
             btn1.style.color="red";
             btn2.style.color="";
             btn3.style.color="";
             btn4.style.color="";

              }
              function   show2(){
             pic.src=" images/2.jpg ";
             btn1.style.color="";
             btn2.style.color="red";
             btn3.style.color="";
             btn4.style.color="";

              }
              function   show3(){
             pic.src=" images/3.jpg ";
             btn1.style.color="";
             btn2.style.color="";
             btn3.style.color="red";
             btn4.style.color="";

              }
              function   show4(){
             pic.src=" images/4.jpg ";
             btn1.style.color="";
             btn2.style.color="";
             btn3.style.color="";
             btn4.style.color="red";

              }




     </script>
</body>
</html>